# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=onionsearch
pkgver=44.fc9d62c
pkgrel=3
pkgdesc='Script that scrapes urls on different ".onion" search engines.'
groups=('blackarch' 'blackarch-webapp' 'blackarch-scanner')
arch=('any')
url='https://github.com/megadose/OnionSearch'
license=('MIT')
depends=('python' 'python-beautifulsoup4' 'python-requests' 'python-tqdm'
         'python-urllib3')
makedepends=('git' 'python-setuptools')
source=("$pkgname::git+https://github.com/megadose/OnionSearch.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

build() {
  cd $pkgname

  python setup.py build
}

package() {
  cd $pkgname

  python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
}

